<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>dp12: Examples</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">dp12
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li class="current"><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('example.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Examples </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>You can refer to the below stated example applications for more details which gives an idea about display port.</p>
<p>The 2 DisplayPort RX examples are as follows.</p>
<h1><a class="anchor" id="ex1"></a>
xdp_rx_sst_dp159_example.c</h1>
<p>This interrupt with timer example shows how to set up both the interrupt system with interrupt handlers and how to override the default sleep/delay functionality for MicroBlaze. A timer needs to exist in the hardware system and will be used for sleep/delay functionality inside of a callback function. The default behavior in MicroBlaze for sleep/delay is to call MB_Sleep from microblaze_sleep.h, which has only millisecond accuracy. For ARM/Zynq SoC systems, the supplied callback function will be ignored - the usleep function will be called since the SoC has a timer built-in. The programming sequence for the DP159 retimer is provided. This example uses the EmacPs's interrupt driven DMA packet transfer mode to send and receive frames.</p>
<p>For details, see <a class="el" href="xdp__rx__sst__dp159__example_8c.html" title="Contains a design example using the XDp driver for an DP RX core generated with SST-only functionalit...">xdp_rx_sst_dp159_example.c</a>.</p>
<h1><a class="anchor" id="ex2"></a>
xdp_rx_mst_example.c</h1>
<p>This multi-stream transport (MST) example uses interrupts to detect events coming from the TX. The example sets up a topology that the RX will respond with, including LINK_ADDRESS reply and I2C and DPCD address spaces for the downstream ports.</p>
<p>For details, see <a class="el" href="xdp__rx__mst__example_8c.html" title="Contains a design example using the XDp driver with multi-stream transport (MST) functionality. ">xdp_rx_mst_example.c</a>.</p>
<dl class="section note"><dt>Note</dt><dd>All example functions start with Dprx_*, while all driver functions start with XDp_*.</dd></dl>
<p>The 5 DisplayPort TX examples are as follows.</p>
<h1><a class="anchor" id="ex3"></a>
xdp_tx_audio_example.c</h1>
<p>This audio example, apart from training the main link and outputting video, illustrates the sequence required for setting up audio in the DisplayPort TX. This example requires that an audio source, such as a S/PDIF instance be present and connected to the DisplayPort TX in the hardware system, and for the audio enable configuration parameter to be set for the instantiated DisplayPort TX. For audio to output, the user will need to implement the following functions: a) Dptx_ConfigureAudioSrc : This function needs to configure the audio source to output to the DisplayPort TX. b) Dptx_AudioSendInfoFrame : This function needs to set up and write an audio info frame as per user requirements.</p>
<p>For details, see <a class="el" href="xdp__tx__audio__example_8c.html" title="Contains a design example using the XDp driver (operating in TX mode) to train the main link and to d...">xdp_tx_audio_example.c</a>.</p>
<h1><a class="anchor" id="ex4"></a>
xdp_tx_intr_example.c</h1>
<p>This interrupt example shows how to set up the interrupt system and specify the interrupt handlers for when a DisplayPort interrupt event occurs. An interrupt controller with a connection to the DisplayPort interrupt signal needs to exist in the hardware system.</p>
<p>For details, see <a class="el" href="xdp__tx__intr__example_8c.html" title="Contains a design example using the XDp driver (operating in TX mode) with interrupts. ">xdp_tx_intr_example.c</a>.</p>
<h1><a class="anchor" id="ex5"></a>
xdp_tx_mst_example.c</h1>
<p>This multi-stream transport (MST) example shows how to use the driver's MST capabilities. Streams can be directed at sinks using two methods: a) After topology discover has created a sink list, streams may be assigned to sinks using the index in the sink list. b) The streams may be assigned to sinks directly without using topology discovery if their relative addresses (and total number of DisplayPort links) from the DisplayPort source is known beforehand.</p>
<p>For details, see <a class="el" href="xdp__tx__mst__example_8c.html" title="Contains a design example using the XDp driver (operating in TX mode) in multi-stream transport (MST)...">xdp_tx_mst_example.c</a>.</p>
<h1><a class="anchor" id="ex6"></a>
xdp_tx_poll_example.c</h1>
<p>This interrupt example shows how to poll the DisplayPort TX instance's registers for DisplayPort interrupt events.</p>
<p>For details, see <a class="el" href="xdp__tx__poll__example_8c.html" title="Contains a design example using the XDp driver (operating in TX mode) with polling. ">xdp_tx_poll_example.c</a>.</p>
<h1><a class="anchor" id="ex7"></a>
xdp_tx_timer_example.c</h1>
<p>This timer example shows how to override the default sleep/delay functionality for MicroBlaze. A timer needs to exist in the hardware system and will be used for sleep/delay functionality inside of a callback function. The default behavior in MicroBlaze for sleep/delay is tocall MB_Sleep from microblaze_sleep.h, which has only millisecond accuracy. For ARM/Zynq SoC systems, the supplied callback function will be ignored - the usleep function will be called since the SoC has a timer built-in.</p>
<p>For details, see <a class="el" href="xdp__tx__timer__example_8c.html" title="Contains a design example using the XDp driver (operating in TX mode) with a user-defined hook for de...">xdp_tx_timer_example.c</a>.</p>
<h1><a class="anchor" id="ex8"></a>
xdp_selftest_example.c</h1>
<p>This self test example will perform a sanity check on the state of the DisplayPort TX/RX instance. It may be called prior to usage of the core or after a reset to ensure that (a subset of) the registers hold their default values.</p>
<p>For details, see <a class="el" href="xdp__selftest__example_8c.html" title="Contains a design example using the XDp driver. ">xdp_selftest_example.c</a>.</p>
<h1><a class="anchor" id="ex9"></a>
xdp_tx_example_common.c</h1>
<p>This example performs a self test on the DisplayPort TX core by training the main link at the maximum common capabilities between the TX and RX and checking the lane status.</p>
<p>For details, see <a class="el" href="xdp__tx__example__common_8c.html" title="Contains a design example using the XDp driver (operating in TX mode). ">xdp_tx_example_common.c</a>.</p>
<h1><a class="anchor" id="ex10"></a>
xdp_tx_example_common.h</h1>
<p>This is the header file which is common for all examples.</p>
<p>For details, see <a class="el" href="xdp__tx__example__common_8h.html" title="Contains a design example using the XDp driver (operating in TX mode). ">xdp_tx_example_common.h</a>.</p>
<h2><a class="anchor" id="IMPORTANT"></a>
NOTES</h2>
<ul>
<li>Each of these examples are meant to be used in conjunction with xdp_tx_example_common.[ch] which holds common functionality for all examples. After importing the examples, these files will need to be manually copied into the example src/ directory. This code shows how to train the main link and set up a video stream.</li>
<li>Additionally, in order to be able to use the interrupt, polling, and timer examples, the user will need to implement and link the following functions: 1) Dptx_InitPlatform : This function needs to do all hardware system initialization. 2) Dptx_StreamSrc* : These function need to configure the source of the stream (pattern generators, video input, etc.) such that a video stream, with timings and video attributes that correspond to the main stream attributes (MSA) configuration, is received by the DisplayPort Tx. The examples call this function from the Dptx_Run-&gt;Dptx_StartVideoStream functions in <a class="el" href="xdp__tx__example__common_8c.html" title="Contains a design example using the XDp driver (operating in TX mode). ">xdp_tx_example_common.c</a>.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>All example functions start with Dptx_*, while all driver functions start with XDp_*. </dd></dl>
</div></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
